import { defineStore } from "pinia";
import { ref } from "vue";

export const useUserStore = defineStore(
  "user",
  () => {
    const accessToken = ref('')
    const refreshToken= ref('')
    function setAccessToken(token) {
      accessToken.value = token
    }
    function setRefreshToken(token){
      refreshToken.value = token
    }
    return { accessToken, refreshToken, setAccessToken, setRefreshToken }
  },
  {
    persist: true
  });